\subsubsection{Method: play()}
Method for the audio playback, where the loaded song is played.

\begin{ocl}{file loaded}{audioplayer}
\pre{controller.loaded\_file \le null}
\end{ocl}

\begin{ocl}{song is playing}{AudioPlayer}
\post{playing == true}
\end{ocl}


\subsubsection{Method: pause()}
Method for pausing the playback.

\begin{ocl}{song is playing}{audioplayer}
\pre{playing == true}
\end{ocl}

\begin{ocl}{playback is paused}{audioplayer}
\post{playing == false}
\end{ocl}


\subsubsection{Method: stop()}
Method for stopping the playback

\begin{ocl}{playback has stopped}{audioplayer}
\post{self.current\_position == 0}
\end{ocl}


\subsubsection{Method: change\_volumne(value)}
Method for adjusting the volume.

\begin{ocl}{value is valid}{audioplayer}
\pre{0 \le value \le 100}
\end{ocl}

\begin{ocl}{value is set}{audioplayer}
\post{self.volume == value}
\end{ocl}


\subsubsection{Method: select(start, end)}
Method for selecting a segment of the loaded audio song.

\begin{ocl}{start is before end}{segment}
\inv{self.start < self.end}
\end{ocl}


\subsubsection{Method: copy()}
Method to copy a segment into memory.

\begin{ocl}{segment selected}{segment}
\inv{controller.selected\_segment \ne null}
\end{ocl}


\subsubsection{Method: paste(position)}
Method to paste a segment.

\begin{ocl}{valid position}{segment}
\pre{0 \le position \le controller.loaded\_file.length}
\end{ocl}


\subsubsection{Method: delete()}
Method to delete a selected segment.

\begin{ocl}{segment selected}{segment}
\pre{controller.selected\_segment \ne null}
\end{ocl}

\begin{ocl}{selected\_segment == null}
\post{controller.selected\_segment == null}
\end{ocl}


\subsubsection{Method: load\_profile(path)}
Method to load a profile.

\begin{ocl}{valid path}{profile}
\pre{path \ne null \&\& is valid}
\end{ocl}

\begin{ocl}{profile is loaded}{profile}
\post{controller.loaded\_profile == self}
\end{ocl}


\subsubsection{Method: save\_profile(path)}
Method to save the active profile.

\begin{ocl}{valid path}{profile}
\pre{path \ne null \&\& is valid}
\end{ocl}
